package cn.yotta.user.core.server.manager.login;

import cn.yotta.user.api.params.login.BaseLoginRequest;
import cn.yotta.user.core.server.dto.user.UserDto;
import cn.yotta.user.core.server.iface.login.impl.LoginProviderManager;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author wyaoyao
 * @date 2022/11/12 20:40
 */
@Slf4j
@Component
@AllArgsConstructor
public class LoginManagerImpl implements LoginManager {

    private final LoginProviderManager loginProviderManager;


    @Override
    public UserDto auth(BaseLoginRequest loginRequest) {
        // 用户进行授权
        return loginProviderManager.auth(loginRequest);
    }
}
